package executor;

import com.xiaoming.coupon.vo.SettlementInfo;
import constant.RuleFlag;

/**
 * 优惠券模板规则处理器接口定义
 * @author xiaoming
 * @Date 2020/6/22
 */
public interface RuleExecutor {

    /**
     * 规则类型标记
     * @return
     */
    RuleFlag ruleConfig();

    /**
     * 优惠券规则的计算
     * @param settlementInfo {@link SettlementInfo} 包含了选择的优惠券
     * @return {@link SettlementInfo} 修正过的结算信息
     */
    SettlementInfo computeRule(SettlementInfo settlementInfo);
}
